﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:MDCAdminTool.Commands"

    xmlns:Controls="clr-namespace:MDCAdminTool.Controls"    
    xmlns:Reports="clr-namespace:MDCAdminTool.Reports" 
    xmlns:AdminApi="clr-namespace:Microsoft.ApplicationServer.Caching.AdminApi;assembly=Microsoft.ApplicationServer.Caching.Management" 
    xmlns:MDCAdminTool="clr-namespace:MDCAdminTool;assembly=E4D.AppFabric.Entities" 
    xmlns:Cache_Host="clr-namespace:E4D.AppFabric.Entities.Cache_Host;assembly=E4D.AppFabric.Entities" xmlns:Entities="clr-namespace:E4D.AppFabric.Entities;assembly=E4D.AppFabric.Entities">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Images.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <HierarchicalDataTemplate DataType="{x:Type MDCAdminTool:HostGroup}"
       ItemsSource="{Binding Hosts}">
        <StackPanel Orientation="Horizontal">
            <Image Name="CacheHostImage" Source="..\Resources\VPN.png" Height="16" Width="16"  Margin="0,0,3,0"/>
            <TextBlock>
            Hosts
            <TextBlock.ContextMenu>
                    <ContextMenu ItemsSource="{StaticResource clusterMenuItems}"/>
            </TextBlock.ContextMenu>
            </TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type MDCAdminTool:CacheGroup}"
       ItemsSource="{Binding CacheNames}">
        <StackPanel Orientation="Horizontal">
            <Image Source="..\Resources\db.ico" Height="16" Width="16"  Margin="0,0,3,0"/>
            <TextBlock>
            Caches
            <TextBlock.ContextMenu>
                    <ContextMenu ItemsSource="{StaticResource clusterMenuItems}"/>
            </TextBlock.ContextMenu>

            </TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type MDCAdminTool:CacheGroupHA}"
       ItemsSource="{Binding CacheNames}">
        <StackPanel Orientation="Horizontal">
            <Image Source="..\Resources\db.ico" Height="16" Width="16"  Margin="0,0,3,0"/>
            <TextBlock>
            CachesHA
            <TextBlock.ContextMenu>
                    <ContextMenu ItemsSource="{StaticResource clusterMenuItems}"/>
            </TextBlock.ContextMenu>
            </TextBlock>
        </StackPanel>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type MDCAdminTool:CacheHost}">
        <StackPanel Orientation="Horizontal">
            <Image Name="CacheHostImage" Source="..\Resources\VPN.png" Height="16" Width="16"  Margin="0,0,3,0"/>
            <TextBlock>
            Host: <TextBlock Text="{Binding Name}" FontWeight="Bold"/>     
            <TextBlock.ContextMenu>
               <ContextMenu>
                  <MenuItem Header="Start Cache Host"      Command="{StaticResource StartCacheHost}"   CommandParameter="{Binding}" Icon="{StaticResource Play16}"/>
                  <MenuItem Header="Stop Cache Host"       Command="{StaticResource StopCacheHost}"    CommandParameter="{Binding}" Icon="{StaticResource Stop16}"/>  
                  <MenuItem Header="Restart Cache Host"    Command="{StaticResource RestartCacheHost}" CommandParameter="{Binding}" Icon="{StaticResource Restart16}"/>
                  <MenuItem Header="Cache Host Config" Command="{StaticResource ConfigCacheHost}" CommandParameter="{Binding}" Icon="{StaticResource GetHostConfig16}"/>                  
                  <MenuItem Header="Remove Cache Host" Command="{StaticResource RemoveCacheHost}" CommandParameter="{Binding}"/>
                   <MenuItem Header="Reload Cache Host" Command="{StaticResource ReloadCacheHost}" CommandParameter="{Binding}" Icon="{StaticResource Reload16}"/>                  
                   <MenuItem Header="Host Stats" Command="{StaticResource CacheHostStats}" CommandParameter="{Binding}"/>
                   <MenuItem Header="Size by Host" Command="{StaticResource CacheNameSizesByHost}" CommandParameter="{Binding}"/>
                   <MenuItem Header="Start Remote PS Session" Command="{StaticResource StartPowerShell}" CommandParameter="{Binding}"/>
               </ContextMenu>
            </TextBlock.ContextMenu>

         </TextBlock>
            <!--<StackPanel.ToolTip>
            
         </StackPanel.ToolTip>-->
        </StackPanel>
        <HierarchicalDataTemplate.Triggers>
            <DataTrigger Binding="{Binding Status}">
                <DataTrigger.Value>
                    <AdminApi:ServiceStatus>UP</AdminApi:ServiceStatus>
                </DataTrigger.Value>
                <Setter TargetName="CacheHostImage" Property="Source" Value="..\Resources\ServerUp.png" />
                <Setter TargetName="CacheHostImage" Property="Height" Value="16" />
                <Setter TargetName="CacheHostImage" Property="Width"  Value="16" />
            </DataTrigger>
            <DataTrigger Binding="{Binding Status}">
                <DataTrigger.Value>
                    <AdminApi:ServiceStatus>DOWN</AdminApi:ServiceStatus>
                </DataTrigger.Value>
                <Setter TargetName="CacheHostImage" Property="Source" Value="..\Resources\ServerDown.png" />
                <Setter TargetName="CacheHostImage" Property="Height" Value="16" />
                <Setter TargetName="CacheHostImage" Property="Width"  Value="16" />
            </DataTrigger>
        </HierarchicalDataTemplate.Triggers>
    </HierarchicalDataTemplate>

    <DataTemplate x:Key="CacheHostContentTemplate" DataType="{x:Type MDCAdminTool:CacheHost}">
        <GroupBox Padding="15">
            <ScrollViewer>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30*" />
                        <RowDefinition Height="200*" />
                        <RowDefinition Height="30*" />
                    </Grid.RowDefinitions>

                    <StackPanel x:Name="spTitle" Grid.Row="0" Orientation="Horizontal" Margin="15,0,0,0">
                        <ContentControl Name="CacheHostImage" Content="{StaticResource HostImage}" />
                        <TextBlock Text="{Binding Name}" FontSize="32" FontWeight="Bold" Margin="15,0,0,0" />
                        <TextBlock x:Name="HeaderText" Text=" Cache Host" FontSize="32" FontWeight="Bold"/>
                    </StackPanel>

                    <StackPanel x:Name="spBody" Margin="15" Orientation="Vertical" Grid.Row="1">
                        <GroupBox Padding="15" Margin="0,0,0,25">
                            <GroupBox.Header>
                                <StackPanel Orientation="Horizontal">
                                    <StaticResource ResourceKey="GetHostConfig16" />
                                    <TextBlock Text="Cache Host Config" Margin="5,0,0,0"/>
                                </StackPanel>
                            </GroupBox.Header>
                            <Grid>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />                                    
                                </Grid.RowDefinitions>

                                <Label Content="Host Name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="hostNameTextBox" Text="{Binding Path=Name}" VerticalAlignment="Center" Width="120" IsReadOnly="True" />
                                
                                <Label Content="Service Name:" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="3" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="serviceNameTextBox" Text="{Binding Path=ServiceName}" VerticalAlignment="Center" Width="120"  IsReadOnly="True" />

                                <Label Content="Cache Port:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="cachePortTextBox" Text="{Binding Path=CachePort}" VerticalAlignment="Center" Width="120"  IsReadOnly="True" />
                                
                                <Label Content="Cluster Port:" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="3" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="clusterPortTextBox" Text="{Binding Path=ClusterPort}" VerticalAlignment="Center" Width="120" IsReadOnly="True" />

                                <Label Content="Arbitrator Port:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" ToolTip="{StaticResource Help-Desc-ArbitratorPort}"/>
                                <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="ArbitratorPortTextBox" Text="{Binding Path=ArbitratorPort}" VerticalAlignment="Center" Width="120" ToolTip="{StaticResource Help-Desc-ArbitratorPort}" IsReadOnly="True" />

                                <Label Content="Replication Port:" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" ToolTip="{StaticResource Help-Desc-ReplicationPort}"/>
                                <TextBox Grid.Column="3" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="ReplicationPortTextBox" Text="{Binding Path=ReplicationPort}" VerticalAlignment="Center" Width="120" ToolTip="{StaticResource Help-Desc-ReplicationPort}" IsReadOnly="True" />


                                <Label Content="High Wm:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" ToolTip="{StaticResource Help-Desc-HWW}"/>
                                <TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3" Name="highWmTextBox" Text="{Binding Path=HighWm}" VerticalAlignment="Center" Width="120" ToolTip="{StaticResource Help-Desc-HWW}" IsReadOnly="True" />

                                <Label Content="Lowh Wm:" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" ToolTip="{StaticResource Help-Desc-LWW}"/>
                                <TextBox Grid.Column="3" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3" Name="lowhWmTextBox" Text="{Binding Path=LowhWm}" VerticalAlignment="Center" Width="120" ToolTip="{StaticResource Help-Desc-LWW}" IsReadOnly="True" />

                                <Label Content="Is Lead Host:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <CheckBox Grid.Column="1" Grid.Row="4" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=IsLeadHost}" Margin="3" Name="isQuorumHostCheckBox" VerticalAlignment="Center" Width="120"  IsEnabled="False"/>
                                
                                <Label Content="Is Open:" Grid.Column="2" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <CheckBox Grid.Column="3" Grid.Row="4" Height="16" HorizontalAlignment="Left" IsChecked="{Binding Path=IsOpen}" Margin="3" Name="isOpenCheckBox" VerticalAlignment="Center" Width="120" IsEnabled="False" />

                                <Label Content="Size:" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="5" Height="23" HorizontalAlignment="Left" Margin="3" Name="sizeTextBox" Text="{Binding Path=Size}" VerticalAlignment="Center" Width="120"  IsReadOnly="True" />
                                <Label Content="Status:" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="3" Grid.Row="5" Height="23" HorizontalAlignment="Left" Margin="3" Name="statusTextBox" Text="{Binding Path=Status}" VerticalAlignment="Center" Width="120"  IsReadOnly="True" />


                            </Grid>
                        </GroupBox>
                        <!--<GroupBox Padding="15">
                     <GroupBox.Header>
                        <StackPanel Orientation="Horizontal">
                           <StaticResource ResourceKey="CacheHostStatistics16" />
                           <TextBlock Text="Cache Host Stats" Margin="5,0,0,0"/>
                        </StackPanel>
                     </GroupBox.Header>
                     <TabControl>
                        <TabItem Header="Stat">
                           <Grid >

                              <Grid.ColumnDefinitions>
                                 <ColumnDefinition Width="Auto" />
                                 <ColumnDefinition Width="Auto" />
                                 <ColumnDefinition Width="Auto" />
                                 <ColumnDefinition Width="Auto" />
                              </Grid.ColumnDefinitions>
                              <Grid.RowDefinitions>
                                 <RowDefinition Height="Auto" />
                                 <RowDefinition Height="Auto" />
                                 <RowDefinition Height="Auto" />
                              </Grid.RowDefinitions>

                              <Label Content="Item Count:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                              <TextBox IsReadOnly="True" Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="itemCountTextBox" Text="{Binding Path=HostCacheStats.ItemCount}" VerticalAlignment="Center" Width="120" />
                              <Label Content="Miss Count:" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                              <TextBox  IsReadOnly="True" Grid.Column="3" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="missCountTextBox" Text="{Binding Path=HostCacheStats.MissCount}" VerticalAlignment="Center" Width="120" />

                              <Label Content="Region Count:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                              <TextBox  IsReadOnly="True" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="regionCountTextBox" Text="{Binding Path=HostCacheStats.RegionCount}" VerticalAlignment="Center" Width="120" />
                              <Label Content="Request Count:" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                              <TextBox  IsReadOnly="True" Grid.Column="3" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="requestCountTextBox" Text="{Binding Path=HostCacheStats.RequestCount}" VerticalAlignment="Center" Width="120" />

                              <Label Content="Size:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                              <TextBox  IsReadOnly="True" Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="sizeTextBox3" Text="{Binding Path=HostCacheStats.Size}" VerticalAlignment="Center" Width="120" />

                           </Grid>
                        </TabItem>
                        <TabItem>
                           <TabItem.Header>
                              <TextBlock>
                                 CacheName Sizes By Host <TextBlock Text="{Binding Name}" />
                              </TextBlock>
                           </TabItem.Header>
                           <Reports:CacheNameSizesByHostChart Host="{Binding}" />
                        </TabItem>
                     </TabControl>
                  </GroupBox>-->
                    </StackPanel>

                    <StackPanel x:Name="spFooter" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
                        <Button Height="23" Width="75" Margin="5,0,5,0" Content="Cancel" Command="{StaticResource TabClose}"/>
                        <!--<Button Height="23" Width="75" Margin="5,0,5,0" Content="Save" Command="{StaticResource SaveCacheHost}" CommandParameter="{Binding}"/>-->
                    </StackPanel>
                </Grid>
            </ScrollViewer>
        </GroupBox>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Status}">
                <DataTrigger.Value>
                    <AdminApi:ServiceStatus>UP</AdminApi:ServiceStatus>
                </DataTrigger.Value>
                <Setter TargetName="CacheHostImage" Property="Content" Value="{StaticResource HostImageUp}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding Status}">
                <DataTrigger.Value>
                    <AdminApi:ServiceStatus>DOWN</AdminApi:ServiceStatus>
                </DataTrigger.Value>
                <Setter TargetName="CacheHostImage" Property="Content" Value="{StaticResource HostImageDown}" />
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Cache_Host:HostConfiguration}">
        <StackPanel Orientation="Horizontal">

            <TextBlock Text="Host Name:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding Name }" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Service Name:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding ServiceName }"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Is Quorum Host:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding IsQuorumHost}" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Cache Port:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding CachePort }"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Cluster Port:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding ClusterPort }"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="High Watermark:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding HighWatermark }"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Low Watermark:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding LowWatermark }"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Size:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding Size}"  FontWeight="Bold" Margin="5,0,10,0"/>

        </StackPanel>
    </DataTemplate>

    <DataTemplate DataType="{x:Type MDCAdminTool:HostCacheStats}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="ItemCount:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding ItemCount}" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="MissCount :" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding MissCount}"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="NamedCacheCount :" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding NamedCacheCount}"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="RegionCount :" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding RegionCount}"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="RequestCount :" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding RequestCount}"  FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Size :" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding Size}"  FontWeight="Bold" Margin="5,0,10,0"/>

        </StackPanel>
    </DataTemplate>
    <DataTemplate DataType="{x:Type AdminApi:HostInfo}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Host Name:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding Name}" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Port No.:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding PortNo}" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Service Name:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding ServiceName}" FontWeight="Bold" Margin="5,0,10,0"/>

            <TextBlock Text="Status:" Margin="5,0,10,0"/>
            <TextBlock Text="{Binding Status}" FontWeight="Bold" Margin="5,0,10,0"/>
        </StackPanel>
    </DataTemplate>
    <DataTemplate DataType="{x:Type Entities:ClusterHealthStatus}">
        <StackPanel Orientation="Vertical">
            <TextBlock Text="Health Status" Margin="5,0,10,0"/>            
                <ItemsControl ItemsSource="{Binding Path=Hosts}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </StackPanel>
    </DataTemplate>
    
    <DataTemplate DataType="{x:Type Entities:HostHealthStatus}">
        <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Host Name:" Margin="10,0,10,0"/>
                <TextBlock Text="{Binding HostName }" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
        </StackPanel>
    </DataTemplate>

    <DataTemplate DataType="{x:Type Entities:CacheHealthStatus}">
        <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Cache Name:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding CacheName }" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Healthy:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding Healthy }" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Under Reconfiguration:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding UnderReconfiguration }" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Not Primary:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding NotPrimary}" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="No Write Quorum:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding NoWriteQuorum}" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Throttled:" Margin="15,0,10,0"/>
                <TextBlock Text="{Binding Throttled}" FontWeight="Bold" Margin="3,0,10,0"/>
            </StackPanel>
            <TextBlock Text="================================" Margin="15,0,10,0"/>
        </StackPanel>
    </DataTemplate>

</ResourceDictionary>